{extend name="common@base/common" /}
{block name="body"}
    <div class="tools auth-botton">
        <a id="add-group" class="btn" href="{:U('createRule')}">新 增</a>
        <a url="{:U('changestatus?method=resumerule')}" class="btn ajax-post" target-form="ids" >启 用</a>
        <a url="{:U('changestatus?method=forbidrule')}" class="btn ajax-post" target-form="ids" >禁 用</a>
        <a url="{:U('changestatus?method=deleterule')}" class="btn ajax-post confirm" target-form="ids" >删 除</a>
    </div>
	<!-- 数据列表 -->
	<div class="data-table table-striped">
	<table>
    <thead>
        <tr>
		<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
		<th>规则</th>
        <th>节点名</th>
		<th>描述</th>
		<th>状态</th>
        <th>附加条件</th>
		<th>操作</th>
		</tr>
    </thead>
    <tbody>
		{notempty name="_list"}
		{volist name="_list" id="vo"}
		<tr>
            <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}" /></td>
			<td><a href="{:U('Rule/editRule?id='.$vo['id'])}">{$vo.name}</a> </td>
            <td>{$vo.title}</td>
            <td>{$vo.group}</td>
            <td>{$vo.status_text}</td>
            <td>{$vo.condition}</td>
			<td>{eq name="vo.status" value="1"}
				<a href="{:U('Rule/changeStatus?method=forbidrule&id='.$vo['id'])}" class="ajax-get">禁用</a>
				{else/}
				<a href="{:U('Rule/changeStatus?method=resumerule&id='.$vo['id'])}" class="ajax-get">启用</a>
				{/eq}
				<a href="{:U('Rule/changeStatus?method=deleterule&id='.$vo['id'])}" class="confirm">删除</a>
                </td>
		</tr>
		{/volist}
		{else/}
		<td colspan="7" class="text-center"> aOh! 暂时还没有内容! </td>
		{/notempty}
	</tbody>
    </table>

	</div>
    <div class="page">
        {$_page|raw}
    </div>
{/block}
